/*
The Player class handles key presses and animates the player character.
*/

#ifndef GUARD_Player_h
#define GUARD_Player_h

#include "Vector3.h"
#include "Object3D.h"
#include "MovableObject.h"
#include "GL/glut.h"
#include "Projectile.h"
#include <vector>

class Player : public MovableObject
{
private:

	static const int HURT_DELAY;
	//static const int HURT_BLINK_DELAY;
	Object3D* mModel;
	float moveSpeed;
	std::vector<Projectile*> projectiles;
	int lastHurtTime;
	int health;
	bool canDraw;

	Collidable* Player::checkCollision(const std::vector<Collidable*>& plats);
	
public:
	Player();
	~Player();

	
	void onAnimationFinish(int state);
	void handleKey(int key, bool down);
	void move(const std::vector<Collidable*>& plats);
	void draw();
	void youreDead();
};

#endif